package ${packageName};

import org.springframework.stereotype.Repository;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Repository
public interface ${className}Repository {

    int deleteByPrimaryKey(Integer id);

    int insert(${className} ${objectName});

    int insertSelective(${className} ${objectName});

    ${className} selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(${className} ${objectName});

    int updateByPrimaryKey(${className} ${objectName});

    List<${className}> selectAll(Map<String, Object> param);

    int selectCount(Map<String, Object> param);

    List<${className}> selectListByPage(Map<String, Object> param);

    @Select({"${r"${sql}"}"})
    @ResultMap("BaseResultMap")
    List<${className}> selectMany(@Param("sql") String sql);

    @Select({"${r"${sql}"}"})
    @ResultMap("BaseResultMap")
    ${className} selectOne(@Param("sql") String sql);



}